package com.qs.pojo.es;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * ES中的商品实体类
 * @author author
 * @since 2023-11-14
 */
@Data
@Document(indexName = "qs_goods")
public class EsGoodsDto{

    @Id
    @Field(type = FieldType.Keyword)
    private Integer key;

    @Field(type = FieldType.Keyword)
    private Integer storeId;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String store;

    @Field(index=false,type = FieldType.Keyword)
    private String storeImage;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String name;

    @Field(type = FieldType.Double)
    private double price;

    @Field(index = false,type = FieldType.Integer)
    private Integer sale;

    @Field(index=false,type = FieldType.Keyword)
    private String image;
}
